
import FirstPageView from './../firstPageView';
import ScanQRCode from './scanQRCode';
import ReactNativeQRcode from '../secondComponent/reactNativeQrcode';

export default class ButtonActionFunction {
    getRouter(index) {
        let _router = {};
        switch (index){
            case 0:
                _router = {
                    title:'first',
                    myProps:{
                        category:'全部',
                        tel:'18516726106'
                    },
                    component:FirstPageView
                };
                break;
            case 1:
                _router = {
                    title:'二维码扫描',
                    myProps:{
                        category:'二维码扫描',
                        tel:'18516726106'
                    },
                    component:ScanQRCode
                };
                break;
            case 2:
                _router = {
                    title:'first',
                    myProps:{
                        category:'全部',
                        tel:'18516726106'
                    },
                    component:FirstPageView
                };
                break;
            case 3:
                _router = {
                    title:'QRCode',
                    myProps:{
                        text:'全部',
                        tel:'18516726106'
                    },
                    component:ReactNativeQRcode
                };
                break;
            case 4:
                _router = {
                    title:'first',
                    myProps:{
                        category:'全部',
                        tel:'18516726106'
                    },
                    component:FirstPageView
                };
                break;
            default:
                _router = {
                    title:'first',
                    myProps:{
                        category:'全部',
                        tel:'18516726106'
                    },
                    component:FirstPageView
                };
                break;
        }
        return _router;
    };
}